<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<html>
<head>
<script type="text/javascript" charset="utf-8">
	$(function() {
		$("input.file_1")
		.filestyle(
		{
			image : "<spring:theme code='theme.admin'/>/imageForms/upload_file.gif",
			imageheight : 29,
			imagewidth : 78,
			width : 300
		});
	});
</script>
<title>Thêm audio book</title>
</head>
<body>
	<div id="page-heading">
		<h1>${titlePage}</h1>
	</div>
	<form:form action="save-adio-book" commandName="audioBookVO"
		method="post" enctype="multipart/form-data">
		<form:hidden path="id"/>
		<form:hidden path="imageUrl"/>
		<form:hidden path="urlAudio"/>
		<table border="0" cellpadding="0" cellspacing="0" id="id-form">
			<tr>
				<th valign="top">Tên Audio:</th>
				<td><form:input path="title" class="inp-form" /></td>
				<td><form:errors path="title" class="error" /></td>
			</tr>

			<tr>
				<th valign="top">Mô tả tóm tắt (Không quá 200 ký tự):</th>
				<td><form:textarea path="description" rows="" cols="" class="form-textarea"></form:textarea></td>
				<td><form:errors path="description" class="error" /></td>
			</tr>

			<tr>
				<th valign="top">Giá:</th>
				<td><form:input path="price" class="inp-form" /></td>
				<td><form:errors path="price" class="error" /></td>
			</tr>

			<tr>
				<th valign="top">Giảm giá:</th>
				<td><form:input path="discount" class="inp-form" /> %</td>
				<td><form:errors path="discount" class="error" /></td>
			</tr>

			<tr>
				<th valign="top">Trạng thái:</th>
				<td><form:radiobutton path="active" value="1"
						class=".inp-form-radio" /><label>Hiển thị</label> 
					<form:radiobutton path="active" value="0" class=".inp-form-radio" />
					<label>Không hiển thị</label></td>
				<td><form:errors path="active" class="error" /></td>
			</tr>
			<tr>
				<th>Ảnh hiện tại:</th>
				<td>${imageCurrent}</td>
				<td></td>
			</tr>
			
			<tr>
				<th>Upload ảnh:</th>
				<td><form:input type="file" path="imageFileUpload" class="file_1" /></td>
				<td>
					<div class="bubble-left"></div>
					<div class="bubble-inner">JPG,PNG,JPEG,GIF. Tối đa là 2MB</div>
					<div class="bubble-right"></div>
				</td>
			</tr>
			<tr>
				<th>File Audio:</th>
				<td>${audioCurrent}</td>
				<td></td>
			</tr>

			<tr>
				<th>Upload file:</th>
				<td><form:input type="file" path="audioFileUpload" class="file_1" /></td>
				<td>
					<div class="bubble-left"></div>
					<div class="bubble-inner">wam, mp3, wav file</div>
					<div class="bubble-right"></div>
				</td>
			</tr>
			<tr>
				<th>&nbsp;</th>
				<td valign="top"><input type="submit" value="Lưu"
					class="form-submit" /> <input type="reset" value="Hủy"
					class="form-reset" onclick="window.location.href='audio-book-info'" /></td>
				<td></td>
			</tr>
		</table>
	</form:form>
</body>
</html>